package top.mcwebsite.markdown.render

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import top.mcwebsite.markdown.model.MarkdownNode
import top.mcwebsite.markdown.theme.LocalMarkdownTheme

object DividerComponent : MarkdownComponent{

    @Composable
    override fun render(markdownNode: MarkdownNode) {
        val theme = LocalMarkdownTheme.current
        Box(
            modifier = Modifier
                .fillMaxWidth()
                .padding(theme.blockPadding)
                .padding(theme.dividerTheme.padding)
                .height(theme.dividerTheme.thickness)
                .background(theme.dividerTheme.color)
        )
    }
}